<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>级联选择器</title>
    <link rel="stylesheet" href="css/qrm-pinming.css">

</head>
<body>
<!--开始-->
<div class="box">
	 地区：
	<div class="qrm-pinming">
	    <div class="qrm-input-border">
			<input type="text" placeholder="请选择" class="qrm-input" style="width: 250px">
	    </div>
		<div class="qrm-main" id="qrm-main">
		</div>
	</div>
</div>
<!--结束-->
<div class="box">
	平台：
	<div class="qrm-pingtai">
		<input type="text" placeholder="请选择" id="testInput">
	</div>
</div>
<div class="box">
	企业：
	<div class="qrm-pingtai">
		<input type="text" placeholder="请选择" id="qiye">
	</div>
</div>
<div class="box">
	车牌号：
	<div class="qrm-pingtai">
		<input type="text" placeholder="请选择" id="car">
	</div>
</div>

<script src="js/jquery.js"></script>
<script src="js/json.js"></script>
<script src="js/qrm-pinming.js"></script>
<script src="js/jquery.select.js"></script>
<script>
	$(function(){
		var attr=[{
			id:"1",
			name:"陕西",
			children:[
				{
					id:"2",
					name:"西安市",
					children:[
						{
							id:"3",
							name:"新城区",
						},
						{
							id:"3",
							name:"碑林区",
						},
						{
							id:"3",
							name:"莲湖区",
						}
					],

				},
				{
					id:"2",
					name:"铜川市",
					children:[
						{
							id:"3",
							name:"王益区",
						},
						{
							id:"3",
							name:"印台区",
						},
						{
							id:"3",
							name:"莲湖区",
						}
					],

				},
				{
					id:"2",
					name:"宝鸡市",
					children:[
						{
							id:"3",
							name:"渭滨区",
						},
						{
							id:"3",
							name:"金台区",
						},
						{
							id:"3",
							name:"陈仓区",
						}
					],

				},
			]
		}];
		// var attrSlect={
    //   "diqu":$(".qrm-input").val(),
    //   "pingtai":$("#testInput").val(),
    //   "qiye":$("#qiye").val(),
    //   "car":$("#car").val(),
		// };
		// $("#testInput").click(function(){
		// 	var diqu=$(".qrm-input").val();

		// });
		var pingtai=[
			{"id":"1","text":"中国石油有限公司"},
			{"id":"2","text":"中国石油天然气股份有限公司"},
			{"id":"4","text":"中国建筑股份有限公司"},
			{"id":"3","text":"中国移动有限公司"},
			{"id":"5","text":"中国工商银行股份有限公司"},
			{"id":"7","text":"中国铁建股份有限公司"},
			{"id":"6","text":"中国中铁股份有限公司"},
			{"id":"8","text":"上海汽车集团股份有限公司"}
		];
		select.creatMainRido("qrm-main",attr);
		$.selectSuggest('testInput',pingtai);
		// $.selectSuggest('qiye',pingtai);
		// $.selectSuggest('car',pingtai);

	})
</script>

</body>
</html>